
package net.atremmedia.gwt.actionjava.examples.basics;

import java.util.ArrayList;
import java.util.List;
import net.atremmedia.gwt.actionjava.examples.AJExample;
import net.atremmedia.gwt.actionjava.examples.basics.samples.Acceleration;
import net.atremmedia.gwt.actionjava.examples.basics.samples.Bobbing;
import net.atremmedia.gwt.actionjava.examples.basics.samples.Bouncing1;
import net.atremmedia.gwt.actionjava.examples.basics.samples.Bouncing2;
import net.atremmedia.gwt.actionjava.examples.basics.samples.Distance;
import net.atremmedia.gwt.actionjava.examples.basics.samples.DrawCircle;
import net.atremmedia.gwt.actionjava.examples.basics.samples.DrawComplexRoundRectangle;
import net.atremmedia.gwt.actionjava.examples.basics.samples.DrawEllipse;
import net.atremmedia.gwt.actionjava.examples.basics.samples.DrawPolyStar;
import net.atremmedia.gwt.actionjava.examples.basics.samples.DrawRectangle;
import net.atremmedia.gwt.actionjava.examples.basics.samples.DrawRoundRectangle;
import net.atremmedia.gwt.actionjava.examples.basics.samples.DrawingCurves;
import net.atremmedia.gwt.actionjava.examples.basics.samples.Friction1;
import net.atremmedia.gwt.actionjava.examples.basics.samples.Friction2;
import net.atremmedia.gwt.actionjava.examples.basics.samples.MultiCurves1;
import net.atremmedia.gwt.actionjava.examples.basics.samples.MultiCurves2;
import net.atremmedia.gwt.actionjava.examples.basics.samples.MultiCurves3;
import net.atremmedia.gwt.actionjava.examples.basics.samples.Oval;
import net.atremmedia.gwt.actionjava.examples.basics.samples.Pulse;
import net.atremmedia.gwt.actionjava.examples.basics.samples.RandomMotion;
import net.atremmedia.gwt.actionjava.examples.basics.samples.Removal;
import net.atremmedia.gwt.actionjava.examples.basics.samples.SimpleAnimation;
import net.atremmedia.gwt.actionjava.examples.basics.samples.Wave1;
import net.atremmedia.gwt.actionjava.examples.basics.samples.Wave2;
import net.atremmedia.gwt.actionjava.examples.frame.AJExampleOverview;
import actionjava.session.view.CanvasInUseException;
import actionjava.session.view.CanvasNotFoundException;

public class BasicsExamples extends AJExampleOverview
{
	public BasicsExamples() throws CanvasNotFoundException, CanvasInUseException
	{
		super("ajTest", 800, 600);
	}

	private AJExample[] createExamples()
	{
		List<AJExample> examples = new ArrayList<AJExample>();
		examples.add(new DrawRectangle(this));
		examples.add(new DrawRoundRectangle(this));
		examples.add(new DrawComplexRoundRectangle(this));
		examples.add(new DrawCircle(this));
		examples.add(new DrawEllipse(this));
		examples.add(new DrawPolyStar(this));
		examples.add(new SimpleAnimation(this));
		examples.add(new Bobbing(this));
		examples.add(new RandomMotion(this));
		examples.add(new Wave1(this));
		examples.add(new Wave2(this));
		examples.add(new Pulse(this));
		examples.add(new Oval(this));
		examples.add(new Distance(this));
		examples.add(new MultiCurves1(this));
		examples.add(new MultiCurves2(this));
		examples.add(new MultiCurves3(this));
		examples.add(new DrawingCurves(this));
		examples.add(new Acceleration(this));
		examples.add(new Bouncing1(this));
		examples.add(new Bouncing2(this));
		examples.add(new Friction1(this));
		examples.add(new Friction2(this));
		examples.add(new Removal(this));

		return examples.toArray(new AJExample[examples.size()]);
	}

	@Override
	public void run()
	{
		setExamples(createExamples());
		super.run();
	}
}
